<%@ page contentType="text/html;charset=UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="layout" content="main" />
<title>Expression ratio study</title>
<g:javascript library="prototype" />
</head>
<body>
	<h1>Expression ratio study</h1>
	<P>
	<h4>select parameters then submit</h4>
	<g:form controller="study" action="makeStudy">
		<g:select name="numerator"
			from="${['POmIntensity', 'POmFoldChangeP3', 'POmFoldChangeP10', 'VPIntensity', 'VPFoldChangeP3', 'VPFoldChangeP10']}" />
		 : 
		<g:select name="denominator"
			from="${['VPIntensity', 'VPFoldChangeP3', 'VPFoldChangeP10', 'POmIntensity', 'POmFoldChangeP3', 'POmFoldChangeP10']}" />
		<br />
		<g:submitButton name="submit" />
		${status }<br />
		<br /> The calculated ratios are:<br />
		${expList}
	</g:form>
	<g:form controller="study" action="saveStudy">
		<br />
		<br />	To save this study, choose a name: 
		<g:textField name="studyName" value="${params.studyName}" />
		<P>
			Tag with a gene name if you wish to:
			<g:textField name="tagName" value="${params.tagName}" />
			<br />Researcher
			<g:select name="researcher"
				from="${['Denis', 'Sara', 'Bruno', 'test', 'Test']}" />
			<%--TODO DRY ** find a way to reference this list from Experiment.RESEARCH_TEAM --%>
			<br />Annotations
			<g:textArea name="annotation"
				value="Enter free text, up to 1000 characters " rows="3" cols="60" />
	
			<g:submitButton name="save study" />
	</g:form>
	${status2}
	<div>
		<ul>

			<g:link controller="study" action="list">

				<br />
				<i>Click to see all studies</i>
			</g:link>
		</ul>
	</div>
	<ul>
		<g:form controller="study" action="searchStudy">
			<br />
			<br />
			<i>Click to search for studies tagged with gene </i>
			<g:textField name="studyGene" value="${params.studyGene}" />
			<g:submitButton name="search" />
		</g:form>
	</ul>
	<ul>
		<g:link controller="study" action="siteHome">
			<br />
			<br />
			<i>Click for home page</i>
		</g:link>
	</ul>
</body>
</html>